= api_form_for @create_account, :url => adaptive_accounts_path(:create_account) do |f|

  .row
    .span5
      %legend Create account request
      = f.input :accountType, :as => :select, :collection => [ "Personal", "Premier", "Business" ]
      = f.fields_for :name do |name|
        = render 'name', :f => name
      = f.input :dateOfBirth
      %legend Address
      = f.fields_for :address do |address|
        = render "address", :f => address
      = f.input :contactPhoneNumber
      = f.input :homePhoneNumber
      = f.input :mobilePhoneNumber
      = f.input :currencyCode
      = f.input :citizenshipCountryCode
      = f.input :preferredLanguageCode
      = f.input :notificationURL
      = f.input :emailAddress
      = f.input :registrationType, :as => :select, :collection => [ "Web", "Mobile" ]
      %legend Web options
      = f.fields_for :createAccountWebOptions do |opt|
        = opt.input :returnUrl
        = opt.input :showAddCreditCard
        = opt.input :showMobileConfirm
        = opt.input :returnUrlDescription
        = opt.input :useMiniBrowser
      = f.input :suppressWelcomeEmail
      = f.input :performExtraVettingOnThisAccount
      = f.input :taxId
      = f.input :partnerField1
      = f.input :partnerField2
      = f.input :partnerField3
      = f.input :partnerField4
      = f.input :partnerField5
    .span5
      = f.fields_for :businessInfo do |bi|
        %legend Business info
        = bi.input :businessName
        = bi.fields_for :businessAddress do |address|
          = render 'address', :f => address
        = bi.input :workPhone
        = bi.input :category
        = bi.input :subCategory
        = bi.input :merchantCategoryCode
        = bi.input :doingBusinessAs
        = bi.input :customerServicePhone
        = bi.input :customerServiceEmail
        = bi.input :disputeEmail
        = bi.input :webSite
        = bi.input :companyId
        = bi.input :dateOfEstablishment
        = bi.input :businessType
        = bi.input :businessSubtype
        = bi.input :incorporationId
        = bi.input :averagePrice
        = bi.input :averageMonthlyVolume
        = bi.input :percentageRevenueFromOnline
        = bi.input :salesVenue
        = bi.input :salesVenueDesc
        = bi.input :vatId
        = bi.input :vatCountryCode
        = bi.input :commercialRegistrationLocation

  .form-actions
    = f.submit "Submit", :class => "btn btn-primary", :data => { :disable_with => "Processing.." }

- if @create_account_response
  = render 'api_response', :request => @create_account, :response => @create_account_response
  = link_to "Redirect Url", @create_account_response.redirectURL if @create_account_response.redirectURL
